3.4.75 \(\int \cos (e+f x) (a+b \sin ^2(e+f x))^p \, dx\) [375]

Optimal. Leaf size=67 \[ \frac {\, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {b \sin ^2(e+f x)}{a}\right ) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^p \left (1+\frac {b \sin ^2(e+f x)}{a}\right )^{-p}}{f} \]

[Out]

hypergeom([1/2, -p],[3/2],-b*sin(f*x+e)^2/a)*sin(f*x+e)*(a+b*sin(f*x+e)^2)^p/f/((1+b*sin(f*x+e)^2/a)^p)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3269, 252, 251} \begin {gather*} \frac {\sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^p \left (\frac {b \sin ^2(e+f x)}{a}+1\right )^{-p} \, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {b \sin ^2(e+f x)}{a}\right )}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]*(a + b*Sin[e + f*x]^2)^p,x]

[Out]

(Hypergeometric2F1[1/2, -p, 3/2, -((b*Sin[e + f*x]^2)/a)]*Sin[e + f*x]*(a + b*Sin[e + f*x]^2)^p)/(f*(1 + (b*Si
n[e + f*x]^2)/a)^p)

Rule 251

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 252

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a + b*x^n)^FracPart[p]/(1 + b*(x^n/a))^Fra
cPart[p]), Int[(1 + b*(x^n/a))^p, x], x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILt
Q[Simplify[1/n + p], 0] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 3269

Int[cos[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b*ff^2*x^2)^p, x], x, Sin[e +
f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \cos (e+f x) \left (a+b \sin ^2(e+f x)\right )^p \, dx &=\frac {\text {Subst}\left (\int \left (a+b x^2\right )^p \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\left (\left (a+b \sin ^2(e+f x)\right )^p \left (1+\frac {b \sin ^2(e+f x)}{a}\right )^{-p}\right ) \text {Subst}\left (\int \left (1+\frac {b x^2}{a}\right )^p \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {b \sin ^2(e+f x)}{a}\right ) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^p \left (1+\frac {b \sin ^2(e+f x)}{a}\right )^{-p}}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 67, normalized size = 1.00 \begin {gather*} \frac {\, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {b \sin ^2(e+f x)}{a}\right ) \sin (e+f x) \left (a+b \sin ^2(e+f x)\right )^p \left (1+\frac {b \sin ^2(e+f x)}{a}\right )^{-p}}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[e + f*x]*(a + b*Sin[e + f*x]^2)^p,x]

[Out]

(Hypergeometric2F1[1/2, -p, 3/2, -((b*Sin[e + f*x]^2)/a)]*Sin[e + f*x]*(a + b*Sin[e + f*x]^2)^p)/(f*(1 + (b*Si
n[e + f*x]^2)/a)^p)

________________________________________________________________________________________

Maple [F]
time = 0.15, size = 0, normalized size = 0.00 \[\int \cos \left (f x +e \right ) \left (a +b \left (\sin ^{2}\left (f x +e \right )\right )\right )^{p}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)*(a+b*sin(f*x+e)^2)^p,x)

[Out]

int(cos(f*x+e)*(a+b*sin(f*x+e)^2)^p,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(a+b*sin(f*x+e)^2)^p,x, algorithm="maxima")

[Out]

integrate((b*sin(f*x + e)^2 + a)^p*cos(f*x + e), x)

________________________________________________________________________________________

Fricas [F]
time = 0.41, size = 25, normalized size = 0.37 \begin {gather*} {\rm integral}\left ({\left (-b \cos \left (f x + e\right )^{2} + a + b\right )}^{p} \cos \left (f x + e\right ), x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(a+b*sin(f*x+e)^2)^p,x, algorithm="fricas")

[Out]

integral((-b*cos(f*x + e)^2 + a + b)^p*cos(f*x + e), x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(a+b*sin(f*x+e)**2)**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(a+b*sin(f*x+e)^2)^p,x, algorithm="giac")

[Out]

integrate((b*sin(f*x + e)^2 + a)^p*cos(f*x + e), x)

________________________________________________________________________________________

Mupad [B]
time = 15.22, size = 64, normalized size = 0.96 \begin {gather*} \frac {\sin \left (e+f\,x\right )\,{\left (b\,{\sin \left (e+f\,x\right )}^2+a\right )}^p\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},-p;\ \frac {3}{2};\ -\frac {b\,{\sin \left (e+f\,x\right )}^2}{a}\right )}{f\,{\left (\frac {b\,{\sin \left (e+f\,x\right )}^2}{a}+1\right )}^p} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(e + f*x)*(a + b*sin(e + f*x)^2)^p,x)

[Out]

(sin(e + f*x)*(a + b*sin(e + f*x)^2)^p*hypergeom([1/2, -p], 3/2, -(b*sin(e + f*x)^2)/a))/(f*((b*sin(e + f*x)^2
)/a + 1)^p)

________________________________________________________________________________________